Skip to content

Ensure scala.concurrent.java8._ is packaged #27

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 16, 2015

Conversation

retronym
Copy link
Member

The implementation of FutureConverters needs to access
some private[concurrent] members in the standard library.
To do so, it places some of its implementation under this package.

However, the OSGi SBT plugin seems to silently remove packages from the
final artifact that aren't either a publicly exported or a declared
private package.

Because of this, the 0.2.0 released JARs did not contain these
classes, and using FutureConverters resulted in a linkage error.

After this commit:

% sbt clean publishLocal

% jar tf target/scala-2.11/scala-java8-compat_2.11-0.2.0-SNAPSHOT.jar | grep -v 'scala/compat'
META-INF/MANIFEST.MF
scala-java8-compat.properties
scala/
scala/concurrent/
scala/concurrent/java8/
scala/concurrent/java8/FuturesConvertersImpl$.class
scala/concurrent/java8/FuturesConvertersImpl$CF$$anon$1.class
scala/concurrent/java8/FuturesConvertersImpl$CF.class
scala/concurrent/java8/FuturesConvertersImpl$P.class
scala/concurrent/java8/FuturesConvertersImpl.class

As compared with:

% curl --silent https://oss.sonatype.org/content/repositories/releases/org/scala-lang/modules/scala-java8-compat_2.11/0.2.0/scala-java8-compat_2.11-0.2.0.jar | tar tf - | grep -v 'scala/compat'
META-INF/MANIFEST.MF
scala-java8-compat.properties
scala/

Review by @rkuhn

The implementation of `FutureConverters` needs to access
some `private[concurrent]` members in the standard library.
To do so, it places some of its implementation under this package.

However, the OSGi SBT plugin seems to silently remove packages from the
final artifact that aren't either a publicly exported or a declared
private package.

Because of this, the 0.2.0 released JARs did not contain these
classes, and using FutureConverters resulted in a linkage error.

After this commit:

```
% sbt clean publishLocal

% jar tf target/scala-2.11/scala-java8-compat_2.11-0.2.0-SNAPSHOT.jar | grep -v 'scala/compat'
META-INF/MANIFEST.MF
scala-java8-compat.properties
scala/
scala/concurrent/
scala/concurrent/java8/
scala/concurrent/java8/FuturesConvertersImpl$.class
scala/concurrent/java8/FuturesConvertersImpl$CF$$anon$1.class
scala/concurrent/java8/FuturesConvertersImpl$CF.class
scala/concurrent/java8/FuturesConvertersImpl$P.class
scala/concurrent/java8/FuturesConvertersImpl.class
```

As compared with:

```
% curl --silent https://oss.sonatype.org/content/repositories/releases/org/scala-lang/modules/scala-java8-compat_2.11/0.2.0/scala-java8-compat_2.11-0.2.0.jar | tar tf - | grep -v 'scala/compat'
META-INF/MANIFEST.MF
scala-java8-compat.properties
scala/
```

Fixes scala#26
@bantonsson
Copy link

LGTM

retronym added a commit that referenced this pull request Feb 16, 2015
Ensure scala.concurrent.java8._ is packaged
@retronym retronym merged commit 775474b into scala:master Feb 16, 2015
@retronym
Copy link
Member Author

Fixes #26

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants